import 'package:flutter/material.dart';

class Search extends StatefulWidget {
  Map arguments;
  Search({Key? key, required this.arguments}) : super(key: key);

  @override
  State<Search> createState() => _SearchPageState();
}

class _SearchPageState extends State<Search> {
  @override
  void initState() {
    super.initState();
    print(widget.arguments);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
          icon: const Icon(
            Icons.arrow_back_ios,
            color: Colors.white,
          ),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
        title: const Text(
          "搜索",
        ),
        backgroundColor: Colors.blue,
      ),
      body: Container(
        alignment: Alignment.center,
        child: Center(
          child: Container(
            width: 300,
            height: 300,
            alignment: Alignment.center,
            color: Colors.blue,
            child: Text(
              "搜索页面  \n "+widget.arguments.toString(),
              style: TextStyle(color: Colors.white, fontSize:20),
            ),
          ),
        ),
      ),
    );
  }
}
